import 'dart:ui';

extension ColorExtensions on Color {
  String toHex() {
    return '0x${value.toRadixString(16).padLeft(8, '0').toUpperCase()}';
  }
}

extension intExtensions on int {
  Color toColor() {
    return Color(this);
  }
}
extension StringExtensions on String {
  Color toColor() {
    int value = int.parse(replaceFirst('0x', ''), radix: 16);
    return Color(value);
  }
}
